<?php
/**
 * Created by PhpStorm.
 * User: sqq
 * Date: 2018/08/23
 * Time: 下午13:29
 */
class NewsLog extends Eloquent
{
    protected $table = "news_log";
    const STATUS_NEW= 1;

    public static function NewsPush($user_id,$order_id,$type,$order_type,$title="",$description=""){
        $data = [
            'field_name' => 'user_id',
            'field_value' => $user_id,
            'order_id' => isset($order_id)?$order_id:"",
            'description' => $description,
            'title' => $title,
            'type' => $type,
            'order_type' => $order_type,
        ];
        Log::info("info", array("system" => "api3.0" ,"event" => "pushMessage", 'input' =>Input::all() ,"output" => $data));
        Orders::pushMessage($data);
    }

}